﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="Stylesheet" type="text/css" media="screen" href="Screen.css" />
  <title>STP_SetMstConfigTable</title>
</head>
<body>
	<h3>STP_SetMstConfigTable</h3>
	<hr />
<pre>
void STP_SetMstConfigTable
(
    STP_BRIDGE*                   bridge,
    const STP_CONFIG_TABLE_ENTRY* entries,
    unsigned int                  entryCount,
    unsigned int                  timestamp
);
</pre>
	<h4>
		Summary</h4>
	<p>
		Sets the
		MST Config Table (VLAN to MSTID mapping) and computes the Digest field of the MST Configuration Identifier.</p>
	<h4>
		Parameters</h4>
	<dl>
		<dt>bridge</dt>
		<dd>Pointer to a STP_BRIDGE object.</dd>
		<dt>table</dt>
		<dd>Pointer to an array of STP_CONFIG_TABLE_ENTRY, where each entry specifies a mapping
			between a VLAN and its corresponding MSTID. First entry is unused and must be zero; second entry 
            specifies the tree mapped to VLAN 1; third entry specifies the tree mapped to VLAN 2; and so on.</dd>
		<dt>entryCount</dt>
		<dd>The number of entries in <code>table</code>. This must be equal to <code>1 + maxVlanNumber</code>,
            where <code>maxVlanNumber</code> is the value that was passes to STP_CreateBridge.</dd>
		<dt>timestamp</dt>
		<dd>A timestamp used for the debug log. </dd>
	</dl>
	<h4>
		Remarks</h4>
		<p>
			This function
            can be called also when the bridge isn&#39;t running MSTP.</p>
	<p>
		See §13.8 in 802.1Q-2018 for more information about the MST Configuration Identifier.</p>
	<p>
		The caller must not attempt to map a VLAN to a non-existent tree, i.e.,
		the table passed to this function must contain values in the <code>treeIndex</code> field that are &lt;=&nbsp;
        <code>mstiCount</code> parameter that was specified in the
		call to STP_CreateBridge. The STP library raises assertions for invalid values.</p>
	<p>
		The STP library computes the Digest as described in 13.7.d) in 802.1Q-2018.</p>
	<p>
		If this function is not called, a default mapping is used which is generated by
		<a href="STP_CreateBridge.html">STP_CreateBridge</a>. See the Remarks section there for
		more information.</p>
	<p>
		This function may not be called from within an <a href="STP_CALLBACKS.html">STP callback</a>.</p>
    <p>
		See also <a href="STP_GetMstConfigTable.html">STP_GetMstConfigTable</a>.</p>

</body>
</html>
